package com.ruoyi.finance.mapper;

import com.ruoyi.finance.domain.Account;
import com.ruoyi.finance.domain.AccountVO;
import com.ruoyi.finance.domain.Merchant;
import org.apache.ibatis.annotations.Mapper;

import javax.validation.constraints.Max;
import java.util.List;

/**
 * 商户信息Mapper接口
 *
 * @author zt
 * @date 2023-11-19
 */
@Mapper
public interface MerchantMapper
{
    /**
     * 查询商户信息
     * @param merchant
     * @return
     */
    public Merchant selectMerchantByUserOne(Merchant merchant);

    /**
     * 查询商户信息列表
     *
     * @param merchant 商户信息
     * @return 商户信息集合
     */
    public List<Merchant> selectMerchantList(Merchant merchant);

    /**
     * 新增商户信息
     *
     * @param merchant 商户信息
     * @return 结果
     */
    public int insertMerchant(Merchant merchant);

    /**
     * 修改商户信息
     *
     * @param merchant 商户信息
     * @return 结果
     */
    public int updateMerchant(Merchant merchant);

    public int reduceBalance(Merchant merchant);

    public int addBalance(Merchant merchant);

    public List<Account> selectAccountsList(Account account);

    public Merchant selectMerchantPrice(String merchantCode);

    public  int updataBalance(String merchantCode);

    public List<AccountVO> selectSMAndInter(Account account);

}
